// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently, but
// are changed infrequently
//

#pragma once

#include "targetver.h"

// Archivos de encabezado de Windows:
#include <windows.h>
#include <search.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <tchar.h> 
#include <wchar.h>
#include <ctype.h>
#include <assert.h>
#include <search.h>

#include <climits>
#include <ctime>

// Incluyo las clases STL
#include <vector>
#include <list>
#include <stack>
#include <queue>
#include <map>
#include <hash_map>
#include <iostream>
#include <fstream>
#include <sstream>

#include <commctrl.h>
#include <basetsd.h>

#include <d3d10_1.h>
#include <d3dx10.h>

#include <d3d11.h>
#include <d3dx11.h>
#include <D3Dcompiler.h>

#pragma comment (lib, "d3d10.lib")			// Linkeo con El Lib este
#pragma comment (lib, "d3dx10.lib")			// Linkeo con El Lib este
#pragma comment (lib, "d3d11.lib")			// Linkeo con El Lib este
#pragma comment (lib, "d3dcompiler.lib")	// Linkeo con El Lib este
#pragma comment (lib, "dxguid.lib")			// Linkeo con El Lib este

#ifdef _DEBUG
#	pragma comment (lib, "d3dx11d.lib")	// Linkeo con El Lib este
#else
#	pragma comment (lib, "d3dx11.lib")	// Linkeo con El Lib este
#endif

#ifndef _SAFE_RELEASE
#define _SAFE_RELEASE(p)      { if(p) { (p)->Release(); (p)=NULL; } }
#endif

#ifndef _SAFE_DELETE
#define _SAFE_DELETE(p)       { if(p) { delete (p);     (p)=NULL; } }
#endif

#ifndef _SAFE_DELETE_ARRAY
#define _SAFE_DELETE_ARRAY(p) { if(p) { delete[] (p);   (p)=NULL; } }
#endif

#define PI		3.1416f


typedef D3DXVECTOR3 Vector3;
typedef D3DXMATRIX Matrix;

typedef unsigned int		uint32;
typedef unsigned short		uint16;
typedef unsigned char		uint8;
typedef	unsigned long long	int64;

typedef	int					int32;
typedef	short				int16;
typedef	char				int8;
//typedef	long long			int64;

template<typename T> void Swap(T & a,T & b) { T t; t = a; a = b; b = t; }
template<typename T> T Clamp(const T & value,const T & _min,const T & _max) { return value > _max ? _max : (value < _min ? _min : value); }


#include "Graphics/SystemEvents.h"
#include "Graphics/Input.h"
#include "Graphics/Direct3D.h"
#include "Graphics/IndexBuffer.h"
#include "Graphics/VertexBuffer.h"
#include "Graphics/Texture.h"
#include "Graphics/ConstantBuffers.h"

#include "Graphics/Camera.h"
#include "Graphics/Chronometer.h"
